//
//  TestingViewController.m
//  07-homeWork周末作业
//
//  Created by 402030900@qq.com on 16/7/22.
//  Copyright © 2016年 402030900@qq.com. All rights reserved.
//

#import "TestingViewController.h"

@interface TestingViewController ()

@end

@implementation TestingViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor whiteColor];
    // 返回按钮
    UIButton *back = [UIButton buttonWithType:(UIButtonTypeSystem)];
    [back setFrame:CGRectMake(10, 30, 120, 50)];
    back.backgroundColor = [UIColor clearColor];
    [self.view addSubview:back];
    [back setTitle:@"<  返回" forState:(UIControlStateNormal)];
    [back setTitleColor:[UIColor colorWithRed:64 / 255.0 green:169 / 255.0 blue:116 / 255.0 alpha:1] forState:(UIControlStateNormal)];
    back.titleLabel.font = [UIFont boldSystemFontOfSize:20];
    [back addTarget:self action:@selector(back:) forControlEvents:(UIControlEventTouchUpInside)];
    // 验证手机label
    UILabel *testTeleLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 150, 50)];
    testTeleLabel.center = CGPointMake(375/ 2, 150);
    testTeleLabel.backgroundColor = [UIColor clearColor];
    [self.view addSubview:testTeleLabel];
    testTeleLabel.text = @"验证手机";
    testTeleLabel.font = [UIFont fontWithName:@"Helvetica" size:25];
    testTeleLabel.textAlignment = NSTextAlignmentCenter;
    // 手机号(仅支持中国大陆号)
    // 图标
    UIImageView *teleImage = [[UIImageView alloc] initWithFrame:CGRectMake(50, 200, 40, 40)];
    teleImage.backgroundColor = [UIColor clearColor];
    [self.view addSubview:teleImage];
    teleImage.image = [UIImage imageNamed:@"Unknown.png"];
    // 文本框
    UITextField *teleText = [[UITextField alloc] initWithFrame:CGRectMake(50 + 40 + 20, 200, 375 - 100 - 40 - 20, 40)];
    teleText.backgroundColor = [UIColor clearColor];
    [self.view addSubview:teleText];
    teleText.placeholder = @"手机号 (仅支持大陆号)";
    teleText.font = [UIFont boldSystemFontOfSize:20];
    //文本框下面横线
    UIView *textBeloWLine = [[UIView alloc] initWithFrame:CGRectMake(50, 250, 300, 1)];
    textBeloWLine.backgroundColor = [UIColor lightGrayColor];
    [self.view addSubview:textBeloWLine];
    textBeloWLine.alpha = 0.5;
    // 验证码
    // 图标
    UIImageView *testImage = [[UIImageView alloc] initWithFrame:CGRectMake(50, 260, 40, 40)];
    testImage.backgroundColor = [UIColor clearColor];
    [self.view addSubview:testImage];
    testImage.image = [UIImage imageNamed:@"Unknown-1"];
    // 文本框
    UITextField *testText = [[UITextField alloc] initWithFrame:CGRectMake(50 + 40 + 20, 260, 375 - 100 - 40 - 20, 40)];
    testText.backgroundColor = [UIColor clearColor];
    [self.view addSubview:testText];
    testText.placeholder = @"验证码";
    testText.font = [UIFont boldSystemFontOfSize:20];
    //文本框下面横线
    UIView *testBeloWLine = [[UIView alloc] initWithFrame:CGRectMake(50, 310, 300, 1)];
    testBeloWLine.backgroundColor = [UIColor lightGrayColor];
    [self.view addSubview:testBeloWLine];
    testBeloWLine.alpha = 0.5;
    // 下一步
    UIButton *nextStep = [UIButton buttonWithType:(UIButtonTypeSystem)];
    [nextStep setFrame:CGRectMake(50, 350, 300, 50)];
    nextStep.backgroundColor = [UIColor colorWithRed:64 / 255.0 green:169 / 255.0 blue:116 / 255.0 alpha:1];
    [self.view addSubview:nextStep];
    [nextStep setTitle:@"下一步" forState:(UIControlStateNormal)];
    [nextStep setTitleColor:[UIColor whiteColor] forState:(UIControlStateNormal)];
    // 邮箱用户找回密码
    UILabel *findPass = [[UILabel alloc] initWithFrame:CGRectMake(50, 410, 200, 35)];
    findPass.backgroundColor = [UIColor clearColor];
    [self.view addSubview:findPass];
    findPass.text = @"邮箱用户找回密码, 请";
    findPass.textColor = [UIColor lightGrayColor];
    findPass.font = [UIFont boldSystemFontOfSize:18];
    // 点击这里
    UIButton *clickThere = [UIButton buttonWithType:(UIButtonTypeSystem)];
    [clickThere setFrame:CGRectMake(220, 410, 100, 35)];
    clickThere.backgroundColor = [UIColor clearColor];
    [self.view addSubview:clickThere];
    [clickThere setTitle:@"点击这里" forState:(UIControlStateNormal)];
    [clickThere setTitleColor:[UIColor colorWithRed:64 / 255.0 green:169 / 255.0 blue:116 / 255.0 alpha:1] forState:(UIControlStateNormal)];
    clickThere.titleLabel.font = [UIFont boldSystemFontOfSize:20];
    
    
    // Do any additional setup after loading the view.
}
-(void)back:(UIButton *)button {
    [self dismissViewControllerAnimated:YES completion:nil];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
